<template>
  
    <tr>
      <td> <input type="checkbox" v-model="obj.checked"></td>
      <td> {{obj.name}} </td>
      <td> {{obj.price}}</td>
      <td>
        <button @click="shao">-</button>&emsp;
        <span>{{obj.num}}</span>&emsp;
        <button @click="add">+</button>&emsp;
      </td>
      <td>{{obj.price*obj.num}}</td>
      <td>
        <button @click="del">删除</button>
      </td>
    </tr>
 
</template>

<script>
export default {
  props: ['obj','index'],
  methods:{
    shao(){
      this.$emit('jianshao',this.index)
    },
    add(){
      this.$emit('addList',this.index)
    },
    del(){
      this.$emit('delList',this.index)
    }
  }
  
}
</script>

<style>

</style>